void main(List<String> args) {
  Teacher t = Teacher(name: "老高");
  Student s = Student(name: "张三");
  t.eat();
  s.sleep();
}

class Person {
  String? name;
  int? age;
  String? gender;
  
  Person({this.name, this.age, this.gender});

  void eat() {
    print('Person is eating');
  }
  void sleep() {
    print('Person is sleeping');
  }
}

class Teacher extends Person with A {
  Teacher({String? name, int? age, String? gender}) :super(name: name, age: age, gender: gender);
  @override
  void eat() {
    // TODO: implement eat
    // super.eat();
    this.eat1();
  }
}

class Student extends Person with  B {
  Student({String? name, int? age, String? gender}) :super(name: name, age: age, gender: gender);
  @override
  void sleep() {
    // TODO: implement eat
    // super.eat();
    this.sleep1();
  }
}

mixin A {
  void eat1() {
    print('A is eating');
  }
}

mixin B {
  void sleep1() {
    print('B is sleeping');
  }
}


